Image Inpainting:
Background and Theory behind Image inpainting:
Image inpainting is a technique to reconstruct the damaged or missing areas of the pictures. Traditionally, skilled artists have performed image inpainting manually. In our digital world, it has become very desirable to algorithmize this technique performed manually. Bertalmio was the first one to introduce a technique for digital inpainting. His technique was based on partial differential equations. The user provides the damaged portion of the image and his technique reconstructs the damaged section by propagating information from outside of the damaged region along level lines (isophotes). Isophote directions are obtained by finding a normalized vector orthogonal to the discretized gradient vector at each pixel along the inpainting contour. A 2-D Laplacian is used to locally estimate the variation in color smoothness and it is intended that such variation propagate along the isophote direction. At every few steps of the inpainting process, the algorithm runs a few diffusion iterations to smooth the inpainted region (8.8).
Below is an example of how the repaired image looks:
This technique effectively reconstructs the damaged region. One significant drawback of this technique is that it takes minutes for a computer to finish, which is beyond the realm of interactive use.
Incorporation of this technique to our project:
The images for our project are black and white. Therefore, we do not need to the part of the technique which concerns itself with color variation outside of the damaged region (hence the use of Laplacian). As mentioned in the theory section, propagating information along level lines (isophotes) is an isotropic diffusion (linear heat equation). Isotropic diffusion is equivalent to computing weighted averages of pixels’ neighbors. Thus, we used the boundaries (one row above and one row below) as information sources for the missing rows. Moreover, once the first pixels are interpolated, they are used for the interpolation of neighbor pixels in the missing rows, and then second pixels in the rows are used for the third pixels and so forth. We adjust the coefficients that areobtained from the “Fast Digital Image Inpainting” paper by Manuel M. Olivera and his colleagues to weigh the contributions of our neighbors.
|